<!doctype html>
<html xmlns:fb="http://www.facebook.com/2008/fbml">
  <head>

    <title>DS GET USERINFO</title> 
    <link type="text/css" rel="stylesheet" href="templates/css/pre.css" />
    <link type="text/css" rel="stylesheet" href="templates/css/colorbox.css" />
    {literal}
    <style type="text/css"> 
      .full {width:100%}
      .eighty {width:80%}
      .fifty {width:50%} 
      h1 {font-size: 20px; padding: 10px;} 
      h2 {font-size: 15px;}  
    </style>     
    {/literal} 
    <script type="text/javascript" src="templates/js/jquery.min.js"></script>
    <script type="text/javascript" src="templates/js/pre.js"></script>
    <script type="text/javascript" src="templates/js/jquery.colorbox-min.js"></script>
    <script type="text/javascript" src="templates/js/custom.js"></script>
  </head>
  <body style="width:800px; margin:0 auto;">   
    <center><h1>Các hàm sử dụng trong hệ thống Pet Social</h1>  </center>
    <hr class="full" />

    <p>USER info:</p>
    <pre>
      <code>
        {$smarty.session|@print_r}   
      </code>
    </pre>
<hr />
    <!-- ######### GET TOKEN ######### -->
    <h2> 1. Get Token - For Tien Only (PHP CLIENT) </h2>
    <p>
      Các fields truyền vào bao gồm:
      <pre><code><strong>pid</strong>:    int (id của thuấn)<br /><strong>ppass</strong>: &nbsp;string (password của thuấn)<br /><strong>action</strong>: string (getaccesstoken)</code></pre> 
      <br /> <strong>link sample: </strong> <a class="colorbox" title="test get token by GET method" href="/server/dsgame?pid=1&ppass=thuands&action=getaccesstoken">test get token by GET method</a> 
    </p>
    <hr class="fifty" />
    {if isset($smarty.session.user.token)} 
    <p>Token:</p>
    <pre><code>{$smarty.session.user.token}</code></pre>
    <a href="?action=gettoken">Get new token</a>  
    {else}                 
    <a href="?action=gettoken">Get token</a>
    {/if}
    {if isset($result)} 
    <p>Giá trị trả về: </p>
    <pre><code>{$result}</code></pre>  
    {/if}
    <hr class="full" /> 

    <!-- ######### GET CHARACTOR INFO ######### -->
    <h2> 2. Get Charactor Info </h2>
    <p>
      Các fields truyền vào bao gồm:
      <pre><code><strong>pid</strong>:    int (id của thuấn)<br /><strong>ppass</strong>: &nbsp;string (password của thuấn)<br /><strong>action</strong>: string (getcharactor)</code></pre> 
      <br /> <strong>link sample: </strong> <a class="colorbox" title="test get charactor by GET method" href="/server/dsgame?pid=1&ppass=thuands&action=getcharactor">test get charactor by GET method</a> 
    </p>

  </body>
</html>  